Repository navigation
chore(deps): update dependency websocket-driver to ^0.8.0 [security] - #279
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.7.5→^0.8.0websocket-driver: Denial of service triggered by client sending a single pong frame
CVE-2026-140005 / GHSA-9g4r-f5gq-qjrr
More information
Details
Summary
An unauthenticated remote client can trigger an instant crash and denial of service by sending a WebSocket pong frame with specific content.
Details
This library lets a WebSocket connection send a ping frame to the remote peer and register a callback for when the corresponding pong frame is received. These callbacks are stored in a JavaScript object and indexed on the ping message content. This means the remote peer can invoke Object properties by sending a pong frame whose payload is the name of an Object method, for example
hasOwnProperty. If the message names a field whose value is not a function, and the local peer never sent a ping with that content, then the local peer will attempt to call a non-function value, producing an error that crashes the process on Node.js v22 and below.Proof of concept
Given a server running
websocket-driver:A client can connect and send a single pong frame with content
__proto__. This will cause the server to crash.The client can also cause the server to invoke any other Object method, for example
hasOwnProperty, as an unbound function with no arguments. To the best of our knowledge, none of the built-in Object methods have any destructive effects other than to throw an exception if called incorrectly.Impact
Users running a server using
websocket-driverto handle WebSocket connections are vulnerable to denial of service triggered by a single frame sent by an unauthenticated client. The only known mitigation is to upgrade to a patched release.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
websocket-driver: Denial of service triggered by malformed Sec-WebSocket-Key1 header
CVE-2026-140003 / GHSA-c4gv-fww2-jp3r
More information
Details
Summary
An unauthenticated remote client can trigger an instant crash and denial of service by sending a WebSocket draft76 handshake with specially crafted headers.
Details
The
websocket-driverlibrary supports earlier versions of the WebSocket protocol from before the RFC was standardised, particularly thedraft75anddraft76versions. Thedraft76version's handshake involves the client sending two headers namedSec-WebSocket-Key1andSec-WebSocket-Key2. A value is derived from each of these by extracting digits from them and dividing this value by the number of spaces in the header string. The derived values are each written into a buffer which is then hashed, and this process expects the values to fit inside 32 bits.If the values are larger than 32 bits, this triggers an exception in Node's
Buffermodule and this causes the process to crash.To mitigate this, the driver has been fixed to reject values that are too large, and support for draft protocol versions has been disabled by default. Servers wanting to continue to support these versions need to pass the option
allowDrafts: truewhen creating a driver instance.Proof of concept
Given a server using
websocket-driverto handle WebSocket connections:A client can connect and send a set of headers that will pass as a draft76 handshake, with a specially constructed
Sec-WebSocket-Key1header:This will cause the server to crash on Node.js v22 and below.
Impact
An unauthenticated remote attacker can crash any Node.js process that accepts WebSocket upgrades through by sending a single HTTP request with a draft76
Sec-WebSocket-Key1header whose derived value exceeds 32 bits in size.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
websocket-driver: Message corruption and denial of service triggered by crafted client message
CVE-2026-140004 / GHSA-v36f-rjg3-3v46
More information
Details
Summary
An unauthenticated remote client can trigger message corruption and denial of service by starting a draft75 or draft76 WebSocket connection and sending a brief sequence of bytes. The byte sequence is parsed incorrectly and can lead to duplicate messages or server crash.
Details
The
websocket-driverlibrary supports earlier versions of the WebSocket protocol from before the RFC was standardised, particularly thedraft75anddraft76versions. There is a bug in the parsing of messages in these versions that can lead to the server duplicating received messages or crashing when a client sends a specific sequence of bytes over a connection being handled by this parser. No special conditions are required and the input message that triggers this behaviour is very short, so an attacker can easily crash a remote server.To mitigate this, the parser bug has been fixed, and support for draft protocol versions has been disabled by default. Servers wanting to continue to support these versions need to pass the option
allowDrafts: truewhen creating a driver instance.Proof of concept
Given a server using
websocket-driverto handle WebSocket connections:A client can connect and send a set of headers that will pass as a draft75 handshake, followed by two message frames:
This client will cause the server to emit the message
Hitwice when it was only sent once. If the first frame is omitted and the client sends only80 01 ff, then the server crashes.After upgrading to a patched version, both these situations are handled correctly if
allowDrafts: trueis set. If it is not set then the connection is rejected as a bad request.Impact
Users running a server using
websocket-driverto handle WebSocket connections are vulnerable to denial of service triggered by a single frame sent by an unauthenticated client. The only known mitigation is to upgrade to a patched release.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
websocket-driver: Memory exhaustion triggered by buffering of zero-length fragmented frames
CVE-2026-140001 / GHSA-7487-9gcw-9w8w
More information
Details
Summary
A server accepting WebSocket connections using
websocket-drivercan be made to run out of memory by a client sending an indefinite stream of zero-length fragmented message frames.Details
The WebSocket protocol allows messages to be delivered as a series of "fragment" frames.
websocket-driverbuffers all the individual fragments it receives and then concatenates them all when the final fragment is received. By sending a stream of zero-length fragment frames, a client can make the driver store a growing array of zero-lengthBufferobjects in memory, eventually causing it to run out of heap space.This has been mitigated by discarding zero-length fragments when buffering, and by concatenating all received buffers when the number received reaches a certain amount, specifically 1,000,000. websocket-driver does not concatenate buffers on every received frame as this would result in O(n²) time to process a series of frame fragments, as all the data received so far would need to be copied for each new fragment. websocket-driver now compacts the buffer only if it hits a certain size to avoid the buffer array becoming too large.
Impact
A WebSocket server can be made to run out of memory and crash by an unauthenticated remote attacker opening a single connection and sending an indefinite stream of message fragments over it.
Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
websocket-driver: Memory exhaustion triggered by buffering of data received after socket is closed
CVE-2026-140002 / GHSA-v674-7268-hvqh
More information
Details
Summary
A WebSocket server implemented using
websocket-drivercan be made to buffer data in memory indefinitely by a client that connects, sends a single close frame, and then leaves its side of the connection open while it continues to send more data over the connection.Details
When used as documented, a server handles WebSocket connections by piping all bytes received over a TCP socket into the
driverobject provided by this library. On receipt of a WebSocket close frame, the driver emits acloseevent, which the caller should handle by closing the TCP socket. However, since TCP allows sockets to remain half-open, the client can keep its side of the socket open and keep sending data. Due to the state the driver enters after thecloseevent, this data will be buffered in memory but never consumed by the parser. An attacker can exploit this by sending an indefinite stream of bytes over the socket until it causes the server to run out of memory.This has been mitigated by destroying the buffer when the socket undergoes any failure event, including an explicit close. The buffer is dereferenced and no further data will be added to it, and it should eventually be garbage collected along with the rest of the connection objects.
Proof of concept
Given a server accepting WebSocket connections using
websocket-driver:A client can connect to this server, send a WebSocket close frame, and then keep sending more data over the same connection, after the server has closed its side of the connection.
If this client is left running, the server's memory use will continue to grow indefinitely.
Impact
A server using
websocket-drivercan be made to run out of memory and crash by an unauthenticated remote attacker by sending sufficient data over a single socket.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
faye/websocket-driver-node (websocket-driver)
v0.8.1Compare Source
v0.8.0Compare Source
allowDraftsoption to explicitly enable support fordraft75anddraft76protocols; these are now disabled by defaultmaxLengthoption to any registered extensionspongframes to invoke any method fromObject.prototypedraft75parser that could cause message corruption or crashes ifthe byte
0xFFappears in a byte stream following a length prefixSec-WebSocket-Key1orSec-WebSocket-Key2headerurl.parse()Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.